package com.chen.winnerframework.domain.entity.mybatis.log;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 登录日志对象
 *
 * @author chengy
 * @date 2022-11-04
 */
@TableName("sys_login_log")
public class LoginLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Integer id;

    /**
     * 登录用户名
     */
    @Excel(name = "登录用户名", width = 20)
    private String username;

    /**
     * 登录IP
     */
    @Excel(name = "登录IP", width = 20)
    private String ip;

    /**
     * 登录地点
     */
    @Excel(name = "登录地点", width = 20)
    private String location;

    /**
     * 浏览器类型
     */
    @Excel(name = "浏览器类型", width = 20)
    private String browser;

    /**
     * 操作系统
     */
    @Excel(name = "操作系统", width = 20)
    private String os;

    /**
     * 登录状态
     */
    @Excel(name = "登录状态", width = 20, replace = {"成功_0", "失败_1"})
    private Integer status;

    /**
     * 提示消息
     */
    @Excel(name = "提示消息", width = 20)
    private String message;

    /**
     * 登录时间
     */
    @Excel(name = "登录时间", width = 20, format = DatePattern.NORM_DATETIME_PATTERN)
    private Date loginTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

}
